import pytest

from page.app_page_search import PageSearch
from script import log


class TestAppSearch:

    @pytest.mark.smoke
    def test01_search_success(self, driver, login):
        sea = PageSearch(driver)
        sea.page_search("华为耳机")
        result = sea.get_search_success()
        print(f"搜索结果为：{result}")
        log.info(f"搜索结果为：{result}")
        assert "华为耳机" in result
        sea.app_shot("search_success")
